Add grades_summary.json data#4
Conversation
Summary of ChangesHello @kowyo-bot, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request integrates essential course grade information into the repository by adding a new Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request migrates course grading information into a new JSON data file. While this is a valuable addition, the data in the new file has several inconsistencies, structural issues, and potential errors. I've provided specific comments on these issues, including a suggestion for a structural simplification to improve maintainability, pointing out a critical data error, and highlighting various inconsistencies. Addressing these points will significantly improve the quality and usability of this new dataset.
| "COMP2050": { | ||
| "2021": { | ||
| "default": { | ||
| "grade": "作业 10% + 实验 20% + 作业 70%" |
| "default": { | ||
| "default": { | ||
| "grade": "作业 10% + 课堂实验 30%+ 机器人考核 30% + 期末考试 30%" | ||
| } | ||
| } |
There was a problem hiding this comment.
The nested structure with two default keys, like default: { default: { grade: ... } }, seems redundant and is repeated throughout the file. Simplifying this to default: { grade: ... } would make the structure cleaner and easier to parse. This simplification should be applied consistently across the file for all entries.
"default": {
"grade": "作业 10% + 课堂实验 30% + 机器人考核 30% + 期末考试 30%"
}| "course_name": "自动化认知与实践", | ||
| "default": { | ||
| "default": { | ||
| "grade": "作业 10% + 课堂实验 30%+ 机器人考核 30% + 期末考试 30%" |
There was a problem hiding this comment.
There are some formatting inconsistencies in the grade strings throughout the file.
- On this line, there's no space before the
+sign:...30%+ 机器人.... - A similar issue exists on line 89:
...25%+ 实验.... - Some lines have trailing whitespace (e.g., line 55).
For consistency and to prevent potential parsing issues, it would be best to have a consistent format, for example: ... 30% + .... Applying this consistently would improve data quality.
"grade": "作业 10% + 课堂实验 30% + 机器人考核 30% + 期末考试 30%"| "AUTO3028": { | ||
| "2021": { | ||
| "default": { | ||
| "grade": "作业 30% + 期末考试 70%" | ||
| } | ||
| }, | ||
| "2023": { | ||
| "default": { | ||
| "grade": "作业 40% + 期末考试 60%" | ||
| } | ||
| }, | ||
| "course_name": "数学规划与数值优化" | ||
| }, |
There was a problem hiding this comment.
This course has year-specific grading information but lacks a top-level default entry. This is inconsistent with other courses like AUTO3002B (lines 67-84). Adding a default entry, perhaps by using the most recent year's data as the default, would improve consistency and prevent potential issues for data consumers that expect a default scheme. A similar issue exists for COMP2050, EE1007, PHYS1001, etc.
| "EE3015": { | ||
| "course_name": "电力系统分析" | ||
| }, |
| "大一": { | ||
| "default": { | ||
| "grade": "作业 40% + 期末考试 60%" | ||
| } | ||
| }, |
Migrates grades_summary.toml from HITSZ-OpenAuto/repos-management into this repo as JSON at src/hoa_majors/data/grades_summary.json.
Conventions / schema:
CLI lookup order: 入学年份_专业 -> 入学年份_default -> default.
A helper script is included to regenerate the JSON:
Non-year variants in the upstream file (e.g. teacher names, 大一/大二) are dropped; if a course only has such variants, ONE representative value is kept under "default".